<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tiny FTP: cmd_client.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Tiny FTP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">cmd_client.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;errno.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
<code>#include &lt;sys/socket.h&gt;</code><br />
<code>#include &lt;sys/types.h&gt;</code><br />
<code>#include &lt;sys/stat.h&gt;</code><br />
<code>#include &lt;netinet/in.h&gt;</code><br />
<code>#include &lt;arpa/inet.h&gt;</code><br />
<code>#include &lt;dirent.h&gt;</code><br />
<code>#include &lt;fcntl.h&gt;</code><br />
<code>#include &quot;ftp_client.h&quot;</code><br />
<code>#include &quot;cmd_client.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for cmd_client.c:</div>
<div class="dyncontent">
<div class="center"><img src="cmd__client_8c__incl.png" border="0" usemap="#acmd__client_8c" alt=""/></div>
<map name="acmd__client_8c" id="acmd__client_8c">
<area shape="rect" title=" " alt="" coords="505,5,609,32"/>
<area shape="rect" title=" " alt="" coords="129,80,195,107"/>
<area shape="rect" title=" " alt="" coords="220,80,291,107"/>
<area shape="rect" title=" " alt="" coords="5,155,73,181"/>
<area shape="rect" title=" " alt="" coords="97,155,168,181"/>
<area shape="rect" title=" " alt="" coords="193,155,267,181"/>
<area shape="rect" title=" " alt="" coords="292,155,395,181"/>
<area shape="rect" title=" " alt="" coords="419,155,515,181"/>
<area shape="rect" title=" " alt="" coords="539,155,625,181"/>
<area shape="rect" title=" " alt="" coords="747,155,843,181"/>
<area shape="rect" title=" " alt="" coords="868,155,960,181"/>
<area shape="rect" title=" " alt="" coords="985,155,1057,181"/>
<area shape="rect" title=" " alt="" coords="1081,155,1144,181"/>
<area shape="rect" href="ftp__client_8h_source.html" title=" " alt="" coords="1168,155,1263,181"/>
<area shape="rect" href="cmd__client_8h_source.html" title=" " alt="" coords="620,80,725,107"/>
<area shape="rect" href="config_8h_source.html" title=" " alt="" coords="649,155,723,181"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac29c297ae32acdb2172e926d5f144681"><td class="memItemLeft" align="right" valign="top"><a id="ac29c297ae32acdb2172e926d5f144681" name="ac29c297ae32acdb2172e926d5f144681"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>show_help</b> ()</td></tr>
<tr class="memdesc:ac29c297ae32acdb2172e926d5f144681"><td class="mdescLeft">&#160;</td><td class="mdescRight">在客户端展示帮助信息。 <br /></td></tr>
<tr class="separator:ac29c297ae32acdb2172e926d5f144681"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e44b6b3f9491381268f9d0b977185b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cmd__client_8c.html#a1e44b6b3f9491381268f9d0b977185b8">ftp_cmd_filename</a> (char *user_cmd, char *src_file, char *dst_file)</td></tr>
<tr class="memdesc:a1e44b6b3f9491381268f9d0b977185b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取客户端命令后的文件名字。  <a href="cmd__client_8c.html#a1e44b6b3f9491381268f9d0b977185b8">More...</a><br /></td></tr>
<tr class="separator:a1e44b6b3f9491381268f9d0b977185b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aac4e5b4b6e520bfc90d7507c2659bc"><td class="memItemLeft" align="right" valign="top"><a id="a6aac4e5b4b6e520bfc90d7507c2659bc" name="a6aac4e5b4b6e520bfc90d7507c2659bc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>choose_file_type</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:a6aac4e5b4b6e520bfc90d7507c2659bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">提示用户选择文件传输模式。支持ASCII和Binary。 <br /></td></tr>
<tr class="separator:a6aac4e5b4b6e520bfc90d7507c2659bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad378bfcab53bdae7f4b98336fa2fc10e"><td class="memItemLeft" align="right" valign="top"><a id="ad378bfcab53bdae7f4b98336fa2fc10e" name="ad378bfcab53bdae7f4b98336fa2fc10e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_put</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:ad378bfcab53bdae7f4b98336fa2fc10e"><td class="mdescLeft">&#160;</td><td class="mdescRight">PUT命令 <br /></td></tr>
<tr class="separator:ad378bfcab53bdae7f4b98336fa2fc10e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acac70a76f405eb636128febfb0af92b1"><td class="memItemLeft" align="right" valign="top"><a id="acac70a76f405eb636128febfb0af92b1" name="acac70a76f405eb636128febfb0af92b1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_get</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:acac70a76f405eb636128febfb0af92b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">GET命令 <br /></td></tr>
<tr class="separator:acac70a76f405eb636128febfb0af92b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4de1281c324079b1c30bc1cedd406a9"><td class="memItemLeft" align="right" valign="top"><a id="aa4de1281c324079b1c30bc1cedd406a9" name="aa4de1281c324079b1c30bc1cedd406a9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_list</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:aa4de1281c324079b1c30bc1cedd406a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">LS命令 <br /></td></tr>
<tr class="separator:aa4de1281c324079b1c30bc1cedd406a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8be8aad77880f84bc46b4102d654e7c7"><td class="memItemLeft" align="right" valign="top"><a id="a8be8aad77880f84bc46b4102d654e7c7" name="a8be8aad77880f84bc46b4102d654e7c7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_pwd</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:a8be8aad77880f84bc46b4102d654e7c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">PWD命令 <br /></td></tr>
<tr class="separator:a8be8aad77880f84bc46b4102d654e7c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a82fe0eb6ae64cc36450b4cd427aee2"><td class="memItemLeft" align="right" valign="top"><a id="a3a82fe0eb6ae64cc36450b4cd427aee2" name="a3a82fe0eb6ae64cc36450b4cd427aee2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_cd</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:a3a82fe0eb6ae64cc36450b4cd427aee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">CD命令 <br /></td></tr>
<tr class="separator:a3a82fe0eb6ae64cc36450b4cd427aee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f562e4723804de2f79a6eeeac09101a"><td class="memItemLeft" align="right" valign="top"><a id="a1f562e4723804de2f79a6eeeac09101a" name="a1f562e4723804de2f79a6eeeac09101a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_quit</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:a1f562e4723804de2f79a6eeeac09101a"><td class="mdescLeft">&#160;</td><td class="mdescRight">QUIT命令 <br /></td></tr>
<tr class="separator:a1f562e4723804de2f79a6eeeac09101a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ac312058d761fdcd4fcad635109be2b"><td class="memItemLeft" align="right" valign="top"><a id="a4ac312058d761fdcd4fcad635109be2b" name="a4ac312058d761fdcd4fcad635109be2b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_delete</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:a4ac312058d761fdcd4fcad635109be2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">DELETE命令 <br /></td></tr>
<tr class="separator:a4ac312058d761fdcd4fcad635109be2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad09107aa153b09da2cd98b8db15f1a23"><td class="memItemLeft" align="right" valign="top"><a id="ad09107aa153b09da2cd98b8db15f1a23" name="ad09107aa153b09da2cd98b8db15f1a23"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_mkdir</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:ad09107aa153b09da2cd98b8db15f1a23"><td class="mdescLeft">&#160;</td><td class="mdescRight">MKDIR命令 <br /></td></tr>
<tr class="separator:ad09107aa153b09da2cd98b8db15f1a23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79c650194ffc71227a05a75ee584edff"><td class="memItemLeft" align="right" valign="top"><a id="a79c650194ffc71227a05a75ee584edff" name="a79c650194ffc71227a05a75ee584edff"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ftp_rmdir</b> (<a class="el" href="structMsg.html">Msg</a> *msg)</td></tr>
<tr class="memdesc:a79c650194ffc71227a05a75ee584edff"><td class="mdescLeft">&#160;</td><td class="mdescRight">RMDIR命令 <br /></td></tr>
<tr class="separator:a79c650194ffc71227a05a75ee584edff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20287282a4176cb60d52aa1006223d37"><td class="memItemLeft" align="right" valign="top"><a id="a20287282a4176cb60d52aa1006223d37" name="a20287282a4176cb60d52aa1006223d37"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>local_list</b> ()</td></tr>
<tr class="memdesc:a20287282a4176cb60d52aa1006223d37"><td class="mdescLeft">&#160;</td><td class="mdescRight">本地LLS命令 <br /></td></tr>
<tr class="separator:a20287282a4176cb60d52aa1006223d37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adea1a1e277785005410106330dbd4e10"><td class="memItemLeft" align="right" valign="top"><a id="adea1a1e277785005410106330dbd4e10" name="adea1a1e277785005410106330dbd4e10"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>local_pwd</b> ()</td></tr>
<tr class="memdesc:adea1a1e277785005410106330dbd4e10"><td class="mdescLeft">&#160;</td><td class="mdescRight">本地LPWD命令 <br /></td></tr>
<tr class="separator:adea1a1e277785005410106330dbd4e10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeca792fc35e08ffefefcc50c7ab7a4b9"><td class="memItemLeft" align="right" valign="top"><a id="aeca792fc35e08ffefefcc50c7ab7a4b9" name="aeca792fc35e08ffefefcc50c7ab7a4b9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>local_cd</b> (char *user_cmd)</td></tr>
<tr class="memdesc:aeca792fc35e08ffefefcc50c7ab7a4b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">本地LCD命令 <br /></td></tr>
<tr class="separator:aeca792fc35e08ffefefcc50c7ab7a4b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of the commands in the ftp client.</p>
<dl class="section author"><dt>Author</dt><dd>wgy </dd></dl>
<dl class="section version"><dt>Version</dt><dd>V1.0 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2022-11-13 </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>GNU Public License V3.0 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a1e44b6b3f9491381268f9d0b977185b8" name="a1e44b6b3f9491381268f9d0b977185b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e44b6b3f9491381268f9d0b977185b8">&#9670;&nbsp;</a></span>ftp_cmd_filename()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ftp_cmd_filename </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>user_cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>src_file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>dst_file</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取客户端命令后的文件名字。 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">user_cmd</td><td>客户端命令 </td></tr>
    <tr><td class="paramname">src_file</td><td>全路径名 </td></tr>
    <tr><td class="paramname">dst_file</td><td>文件名 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
